/**
 * Create by yxk at 2020/7/28 0028
 */
import request from 'UTIL/request'

// ----------------------------* AdminUser and AdminDept Service *---------------------------------------------

/**
 * 查询当前登录用户信息
 */
/* export function AdminQueryLoginUser(params) {
  return request({
    url: 'adminUser/queryLoginUser',
    method: 'POST',
    data: params,
		hideLoading: true
  })
} */

/**
 * 查询用户基本信息
 */
export function AdminQueryUserInfo(params) {
  return request({
    url: 'adminUser/queryUserInfo',
    method: 'POST',
    data: params,
    requestType: 'form'
  })
}

/**
 * @description: 查询当前用户的直属上级用户
 * @author: kate同学
 * @date: 2023/5/19 14:51
 */
export function queryDirectParentByUserIdAPI() {
  return request({
    url: 'adminUser/queryDirectParentByUserId',
    method: 'post'
  })
}


/**
 * 修改用户信息
 */
export function AdminSetUser(params) {
  return request({
    url: 'adminUser/updateUser',
    method: 'POST',
    data: params
  })
}

/**
 * 查询员工列表
 */
export function AdminQueryUserList(params) {
  return request({
    url: 'adminUser/queryUserList',
    method: 'POST',
    data: params
  })
}

/**
 * 跟进部门查询员工列表(树结构)
 */
export function AdminQueryUserListByDept(params) {
  return request({
    url: 'adminUser/queryDeptUserList/' + params.deptId,
    method: 'POST',
    data: params
  })
}


/**
 * 查询部门列表
 */
export function AdminQueryDeptTree(params) {
  return request({
    url: 'adminDept/queryDeptTree',
    method: 'POST',
    data: params
  })
}

/**
 * 修改密码
 */
export function UpdatePassword(params) {
  return request({
    url: 'adminUser/updatePassword',
    method: 'POST',
		data: params,
		requestType: 'form'
  })
}

// ----------------------------* AdminRole Service *---------------------------------------------

/**
 * 查询权限
 */
export function AdminRoleAuth() {
  return request({
    url: 'adminRole/auth',
    method: 'POST',
		hideLoading: true
  })
}

// ----------------------------* AdminConfig Service *---------------------------------------------

/**
 * 查询手机端模块配置
 */
export function QueryMobileModuleSetting() {
  return request({
    url: 'adminConfig/queryMobileModuleSetting',
    method: 'POST'
  })
}

/**
 * 修改手机端模块配置
 */
export function SetMobileModuleSetting(data) {
  return request({
    url: 'adminConfig/setMobileModuleSetting',
    method: 'POST',
    data: data
  })
}

/**
 * 查询企业配置
 */
export function QueryCompanyConfig() {
  return request({
    url: 'adminConfig/queryAdminConfig',
    method: 'POST'
  })
}

/**
 * 忽略
 */
export function IgnoreCompanyStatus() {
  return request({
    url: 'adminConfig/ignoreCompanyStatus',
    method: 'POST'
  })
}

// -------------------------------------------------------------------------

/**
 * 查询消息数量
 */
export function QueryUnreadCount() {
  return request({
    url: 'adminMessage/queryUnreadCount',
    method: 'POST',
		hideLoading: true
  })
}
/**
 * 查询消息
 */
export function QueryMessageList(params) {
  return request({
    url: '/app/announcement/announcementList',
    method: 'POST',
		data: params,
		hideLoading: true
  })
}
/* // 分页公告
export function getNoticeList(param) {
    return service.request({
        method: 'POST',
        url: `/app/announcement/announcementList`,
        data: param
    })
} */

/**
 * 消息标记为已读
 */
/* export function ReadMessage(params) {
  return request({
    url: 'adminMessage/readMessage',
    method: 'POST',
		data: params,
		requestType: 'form',
		hideLoading: true
  })
} */
/**
 * 全部标记为已读
 */
export function ReadAllMessage(params) {
  return request({
    url: 'adminMessage/readAllMessage',
    method: 'POST',
		data: params,
		requestType: 'form'
  })
}
/**
 * 删除已读消息
 */
export function MessageClear(params) {
  return request({
    url: 'adminMessage/clear',
    method: 'POST',
		data: params,
		requestType: 'form'
  })
}
/**
 * 删除单个消息
 */
export function MessageDeleteById(params) {
  return request({
    url: 'adminMessage/deleteById/' + params.messageId,
    method: 'POST',
		data: params,
		requestType: 'form'
  })
}
